<extend name="Index/info"/>
<block name="title">资料分类</block>
<block name="body">
    <div class="panel admin-panel">
        <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong></div>
        <div class="padding border-bottom">
            <a href="{:U('AuditData/add_category')}"><button type="button" class="button border-yellow"><span class="icon-plus-square-o"></span> 添加分类</button></a>
        </div>
        <table class="table table-hover text-center">
            <tr>
                <th width="5%">ID</th>
                <th width="15%">一级分类</th>
                <th width="10%">上一级分类</th>
                <th width="10%">操作</th>
            </tr>
            <volist name="category" id="val">
            <tr>
                <td>{$val.id}</td>
                <td>{$val.category_name}</td>
                <td>
                    {$val.upper_level}
                </td>
                <td>
                    <div class="button-group">
                        <a class="button border-main" href="{:U('AuditData/edit_category',array('id'=>$val['id'],'key'=>$val['category_type']))}">
                            <span class="icon-edit"></span> 修改</a>
                        <a class="button border-red" href="{:U('AuditData/del_category',array('id'=>$val['id'],'key'=>$val['category_type']))}">
                            <span class="icon-trash-o"></span> 删除</a>
                    </div>
                </td>
            </tr>
            </volist>
        </table>
    </div>
    <script type="text/javascript">

            function del(url){
                if(confirm("您确定要删除吗?")){
                    console.log(url);
                    window.location.href=url;
                }
            }


    </script>

</block>